package front.struts2.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import com.opensymphony.xwork2.ActionSupport;

public class HelloWorld extends ActionSupport {
	private static final long serialVersionUID = 4319615199992363466L;

	@Action(value = "/execute", results = { @Result(name = "success", location = "/hello.jsp") })
	public String execute() throws Exception {
		message = "Welcome " + userName + " !";
		return "success";
	}

	private String userName;
	private String message;

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getUserName() {
		return userName;
	}

	public String getMessage() {
		return message;
	}

}
